﻿Public Class registrarSatelite

    Private Sub Label9_Click(sender As Object, e As EventArgs) Handles Label9.Click

    End Sub

    Private Sub Nombre_Click(sender As Object, e As EventArgs) Handles Nombre.Click

    End Sub

    Private Sub btnRegistrar_Click(sender As Object, e As EventArgs) Handles btnRegistrar.Click
        Dim idPlaneta As String
        Dim distanciaMediaSol As String
        Dim caracteristicas As String

        idPlaneta = txtIdPlaneta.Text
        distanciaMediaSol = txtDistanciaMediaSol.Text
        caracteristicas = txtCaracteristicas.Text

        If (idPlaneta.Length < 1 & distanciaMediaSol.Length < 1 & caracteristicas.Length < 1) Then
            Dim Id As Integer
            Dim distancia As Long

            Try
                Id = Integer.Parse(idPlaneta)
                distancia = Long.Parse(distanciaMediaSol)
                objGestor.registrarSatellite(Id, distancia, caracteristicas)
            Catch ex As Exception
                MsgBox("Debe insertar valores validos")
            End Try

        Else
            MsgBox("Debe llenar todos los espacios solicitados")
        End If


    End Sub

    Private Sub EliminarToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles EliminarToolStripMenuItem.Click

    End Sub
End Class